Alex Crichton [Fri, 29 May 2015 20:35:29 +0000 (13:35 -0700)]
Don't recurse so often in the dependency graph
Prior to this commit the entire dependency tree would be traversed many, many
times as the short circuits weren't applying fast enough. This commit modifies
the recursion to only happen if the target in question was actually compiled.
This commit saw a noop build time for Servo drop from 4.5s to 2.5s.
Alex Crichton [Fri, 29 May 2015 18:22:44 +0000 (11:22 -0700)]
Implement caching among fingerprint resolutions
This commit adds support for caching the resolved value of a fingerprint among
calls to `resolve`. Due to the recursive nature of a fingerprint, it means that
`resolve` is currently executed a very large number of times for packages which
at transitively dependend up on many times. By caching the returned value of a
fingerprint we're able to prevent extraneous calls into the filesystem or
extraneous hashing.
This also adds an `Arc` to share a `Fingerprint` among all its dependencies as
each fingerprint stores a list of fingerprints that it depends on, and if
they're not shared then the cache isn't exactly the most helpful!
For a noop `cargo build` on Servo (e.g. everything was already built), this
decreased Cargo's runtime from 5s to ~4.5s
bors [Tue, 2 Jun 2015 21:00:35 +0000 (21:00 +0000)]
Auto merge of #1674 - wca:add-freebsd-snapshot, r=alexcrichton
This branch includes a change to dl-snapshot.py that makes it less directly linked to the format of snapshots.txt, and also adds an initial FreeBSD x86_64 cargo snapshot. The original URL for my snapshot is:
http://people.freebsd.org/~will/public_distfiles/cargo-nightly-x86_64-unknown-freebsd.tar.gz
SHA256:
de678e858de5d2923cc206b7aa1cc84ddc67be00748160f66fc9b7325409e7c7
Will Andrews [Tue, 2 Jun 2015 20:40:37 +0000 (14:40 -0600)]
Restore the original triple split.
bors [Tue, 2 Jun 2015 20:38:40 +0000 (20:38 +0000)]
Auto merge of #1664 - IvanUkhov:is-dir, r=alexcrichton
The pull request addresses issue #1663. The problem is that `libgit2` [combines][1] `S_IFDIR ` with `S_IFLNK`, and, therefore, the [strict comparison][2] based on `S_ISDIR` rejects directories.
Regards,
Ivan
[1]: https://github.com/libgit2/libgit2/blob/
47f37400253210f483d84fb9c2ecf44fb5986849/src/index.c#L308
[2]: https://github.com/rust-lang/cargo/blob/
06dbe6555a4a15f5912bbfc841d446dad4d417cc/src/cargo/sources/path.rs#L150
Will Andrews [Tue, 2 Jun 2015 19:56:37 +0000 (13:56 -0600)]
Add initial FreeBSD x86_64 cargo snapshot.
Will Andrews [Tue, 2 Jun 2015 19:46:27 +0000 (13:46 -0600)]
Make fewer assumptions about snapshots.txt format.
- Read the file into a nested dictionary instead of variables.
- Only apply special cases where they are really needed.
- Apply a transform to the triple argument to get the platform name to
determine whether there is a snapshot available for it.
- Apply a similar (but slightly different) transform to get the snapshot's
file name. It would be better if the file name matched the platform name
in snapshots.txt, but it's too late for that now (older versions of this
script will certainly expect the existing name format).
Ivan Ukhov [Sat, 30 May 2015 12:48:25 +0000 (08:48 -0400)]
Fix the detection of directories when listing files using libgit2
Ivan Ukhov [Tue, 2 Jun 2015 13:56:44 +0000 (09:56 -0400)]
tests: add a test for submodule packaging
Ivan Ukhov [Mon, 1 Jun 2015 21:38:30 +0000 (17:38 -0400)]
tests: move Git-related routines to support
bors [Tue, 2 Jun 2015 02:32:13 +0000 (02:32 +0000)]
Auto merge of #1671 - alexcrichton:osx-more-robust, r=huonw
Tests are often flaky because the resolution of the OSX filesystem timestamps
appears to be 1s, so we often have to manually sleep for 1s to ensure that
enough time has passed to guarantee that the timestamp is different (used in
freshness calculations).
Alex Crichton [Tue, 2 Jun 2015 01:24:57 +0000 (18:24 -0700)]
Make a freshness test more robust on OSX
Tests are often flaky because the resolution of the OSX filesystem timestamps
appears to be 1s, so we often have to manually sleep for 1s to ensure that
enough time has passed to guarantee that the timestamp is different (used in
freshness calculations).
bors [Fri, 29 May 2015 05:54:27 +0000 (05:54 +0000)]
Auto merge of #1656 - EduardoBautista:cargo-home-absolute-path, r=alexcrichton
OK, this should fix https://github.com/rust-lang/cargo/issues/1655. It worked on my local. I am not entirely sure how to write a test for this. Can I get some help and be pointed in the right direction?
bors [Fri, 29 May 2015 00:08:40 +0000 (00:08 +0000)]
Auto merge of #1659 - alexcrichton:shorten-paths-on-windows, r=alexcrichton
Unfortunately paths are getting a little too long on Windows and libgit2 is
given us back the error:
Failed to rename lockfile to 'C:/bot/slave/nightly-dist-cargo-win-gnu-64-64/build/target/x86_64-pc-windows-gnu/debug/cit/test-155/home/.cargo/git/checkouts/meta-dep-
27104ee87001fd00/
08c585f6f3927118da012a2d682b67a789c35211/.git/objects/pack/pack-
ba5fd201f4c1be9792e6d54eef194e6b733ae719.idx': The data area passed to a system call is too small.
Windows isn't always the best at handling long paths, so this commit changes the
location of the `cit` output directory where tests are located as well as
shortening the name of each test's folder to hopefully get the folder sizes a
little under the limit.
I believe this test is only failing on the nightly bots because the folder name
for the nightly bots is longer than the folder name for the auto bots. Hurray!
Alex Crichton [Fri, 29 May 2015 00:03:48 +0000 (17:03 -0700)]
Shorten paths in the test runner for windows
Unfortunately paths are getting a little too long on Windows and libgit2 is
given us back the error:
Failed to rename lockfile to 'C:/bot/slave/nightly-dist-cargo-win-gnu-64-64/build/target/x86_64-pc-windows-gnu/debug/cit/test-155/home/.cargo/git/checkouts/meta-dep-
27104ee87001fd00/
08c585f6f3927118da012a2d682b67a789c35211/.git/objects/pack/pack-
ba5fd201f4c1be9792e6d54eef194e6b733ae719.idx': The data area passed to a system call is too small.
Windows isn't always the best at handling long paths, so this commit changes the
location of the `cit` output directory where tests are located as well as
shortening the name of each test's folder to hopefully get the folder sizes a
little under the limit.
I believe this test is only failing on the nightly bots because the folder name
for the nightly bots is longer than the folder name for the auto bots. Hurray!
Eduardo Bautista [Thu, 28 May 2015 20:18:45 +0000 (15:18 -0500)]
Use absolute path for CARGO_HOME
bors [Thu, 28 May 2015 22:59:10 +0000 (22:59 +0000)]
Auto merge of #1658 - alexcrichton:debug-windows, r=alexcrichton
This test is failing on the win64 bot, and I'm not 100% sure why, so trying to
get some more info out of it.
Alex Crichton [Thu, 28 May 2015 22:56:42 +0000 (15:56 -0700)]
Try to debug a failing test on the windows bots
This test is failing on the win64 bot, and I'm not 100% sure why, so trying to
get some more info out of it.
bors [Wed, 27 May 2015 20:14:08 +0000 (20:14 +0000)]
Auto merge of #1653 - alexcrichton:update-tar, r=alexcrichton
Fixes some extraction bugs when unpacking archives.
bors [Wed, 27 May 2015 19:35:25 +0000 (19:35 +0000)]
Auto merge of #1654 - alexcrichton:udpate-ssh2-sys, r=alexcrichton
The bots are trying to build something which isn't needed and is failing on
nightlies, so the build script has been updated to not bulid this unnecessary
artifact as part of libssh2
bors [Wed, 27 May 2015 19:16:14 +0000 (19:16 +0000)]
Auto merge of #1642 - alexcrichton:opt-fs, r=huonw
Traversing large directory trees can take quite some time, and this commit optimizes a few locations to reduce the number of calls to `fs::metadata`.
bors [Wed, 27 May 2015 19:03:50 +0000 (19:03 +0000)]
Auto merge of #1641 - alexcrichton:update-less, r=brson
Updating a path source can be a possibly expensive operation (lots of
directories that need to be traversed), and currently the root path source is
updated three times:
* Once when the root package is initially loaded.
* Again when the first resolution pass happens over a graph.
* Finally a third when the second resolution pass happens over the graph.
This commit pushes through the original `Source` trait object into the
`PackageRegistry` and removes the implicit call to `add_sources`, pushing that
call up to the stack a bit.
bors [Wed, 27 May 2015 18:51:59 +0000 (18:51 +0000)]
Auto merge of #1639 - jimmycuadra:jobs-flag-docs, r=wycats
Addresses #1591.
I believe this issue only affects `cargo bench` and `cargo test`. If it's applicable to any of the other commands, let me know and I'll amend this.
bors [Wed, 27 May 2015 18:41:28 +0000 (18:41 +0000)]
Auto merge of #1637 - dhuseby:bitrig_snapshot, r=alexcrichton
adds the bitrig cargo snapshot. d/l the tarball from here: http://blog.linuxprogrammer.org/cargo-nightly-x86_64-unknown-bitrig.tar.gz
Alex Crichton [Wed, 27 May 2015 18:31:33 +0000 (11:31 -0700)]
Update libssh2-sys's build script
The bots are trying to build something which isn't needed and is failing on
nightlies, so the build script has been updated to not bulid this unnecessary
artifact as part of libssh2
bors [Wed, 27 May 2015 18:29:48 +0000 (18:29 +0000)]
Auto merge of #1617 - alexcrichton:fix-kind-after-the-fact, r=brson
The wrong kind was mistakenly used in the case of having a dependency on a
plugin.
Unfortunately I don't know of a great way to test this, so no unit test is included for now.
Closes #1612
bors [Tue, 26 May 2015 20:05:48 +0000 (20:05 +0000)]
Auto merge of #1651 - Roysten:master, r=alexcrichton
Roy van der Vegt "platypus [Mon, 25 May 2015 14:49:10 +0000 (16:49 +0200)]
fix name escaping issue in Cargo.toml (#1635) and added corresponding
test
Alex Crichton [Tue, 26 May 2015 17:16:41 +0000 (10:16 -0700)]
Update the tar-rs dependency
Fixes some extraction bugs when unpacking archives.
Brian Anderson [Fri, 22 May 2015 03:01:39 +0000 (20:01 -0700)]
Merge pull request #1640 from alexcrichton/fix-rel-config
Fix a relative `rustc` spec to .cargo/config
Alex Crichton [Wed, 20 May 2015 06:07:15 +0000 (23:07 -0700)]
Reduce calls to fs::metadata in list_git_files
When walking over entries in the index of a git repository the file type can be
known without a syscall (in the form of a libc constant), but walking over
untracked files still requires a syscall to determine if it's a directory.
Alex Crichton [Wed, 20 May 2015 06:04:47 +0000 (23:04 -0700)]
Optimize the number of calls to fs::metadata
When iterating over `DirEntry` values the file type of the entry can typically
be determined without a syscall, so use the new unstable APIs in `std::fs` to
avoid an extra call to `fs::metadata`. When traversing large directory trees the
improvement is quite noticeable!
Alex Crichton [Wed, 20 May 2015 05:50:26 +0000 (22:50 -0700)]
Don't update the same path source multiple times
Updating a path source can be a possibly expensive operation (lots of
directories that need to be traversed), and currently the root path source is
updated three times:
* Once when the root package is initially loaded.
* Again when the first resolution pass happens over a graph.
* Finally a third when the second resolution pass happens over the graph.
This commit pushes through the original `Source` trait object into the
`PackageRegistry` and removes the implicit call to `add_sources`, pushing that
call up to the stack a bit.
Alex Crichton [Wed, 20 May 2015 04:43:41 +0000 (21:43 -0700)]
Fix a relative `rustc` spec to .cargo/config
The paths were mistakenly relative to .cargo/config, not the directory
containing .cargo/config
Jimmy Cuadra [Wed, 20 May 2015 04:06:24 +0000 (21:06 -0700)]
Clarify that --jobs doesn't affect parallelism when running the resulting binary.
Dave Huseby [Tue, 19 May 2015 22:38:10 +0000 (15:38 -0700)]
oops forgot to grab the bitrig line
Dave Huseby [Tue, 19 May 2015 22:36:13 +0000 (15:36 -0700)]
updating snapshot scripts to support bitrig
Dave Huseby [Tue, 19 May 2015 22:06:28 +0000 (15:06 -0700)]
adding bitrig cargo snapshot
bors [Tue, 19 May 2015 04:13:45 +0000 (04:13 +0000)]
Auto merge of #1629 - alexcrichton:env-rustc, r=alexcrichton
These commits add two vectors through which the compiler run can be configured:
* A `RUSTC` environment variable
* A `build.rustc` configuration variable in a `.cargo/config` file
Alex Crichton [Mon, 18 May 2015 22:57:17 +0000 (15:57 -0700)]
Add rustc/rustdoc config keys to Cargo config
In addition to global RUSTC/RUSTDOC env vars, this commit recognizes
`build.rustc` and `build.rustdoc` as configuration keys for Cargo to instruct
what tools should be used instead of the default.
Closes #967
bors [Tue, 19 May 2015 01:03:03 +0000 (01:03 +0000)]
Auto merge of #1625 - alexcrichton:ignore-dotfile, r=brson
Whenever Cargo infers various targets for a project it currently picks up all
files in associated folders, but dotfiles are a common example of files which
editors generate which Cargo should not pick up, so this commit ignores all
dotfiles in the folders that it is looking at.
Closes #1615
bors [Tue, 19 May 2015 00:50:07 +0000 (00:50 +0000)]
Auto merge of #1632 - hansjorg:master, r=alexcrichton
Check for existence of file in dl_path before fetching with curl.
If file exists, compare hash with expected.
Also wrap tarfile.open() in contextlib.closing() to support older
python versions (<= 2.6).
This fixes part of #1525.
Hans Jørgen Hoel [Mon, 18 May 2015 23:27:29 +0000 (01:27 +0200)]
Make dl-snapshot.py avoid dl'ing existing files
Check for existence of file in dl_path before fetching with curl.
If file exists, compare hash with expected.
Also wrap tarfile.open() in contextlib.closing() to support older
python versions (<= 2.6).
This fixes part of #1525.
Alex Crichton [Mon, 18 May 2015 22:33:04 +0000 (15:33 -0700)]
Remove borrowed pointer in Config
Not having a lifetime parameter on the ubiquitous Config structure allows a
great deal of other lifetime annotations to be removed and should make dealing
with storage of Config in a structure much easier (only one lifetime to deal
with, not two).
Alex Crichton [Mon, 18 May 2015 21:55:42 +0000 (14:55 -0700)]
Recognize RUSTC/RUSTDOC environment variables
bors [Mon, 18 May 2015 21:49:39 +0000 (21:49 +0000)]
Auto merge of #1628 - alexcrichton:update-deps, r=alexcrichton
Opt in to nightly features for a few, and update others to get bitrig support
Alex Crichton [Mon, 18 May 2015 21:47:33 +0000 (14:47 -0700)]
Update cargo deps
Opt in to nightly features for a few, and update others to get bitrig support
bors [Mon, 18 May 2015 20:07:47 +0000 (20:07 +0000)]
Auto merge of #1627 - brson:version, r=alexcrichton
So we have a unique version number to pair with Rust 1.1.
Brian Anderson [Mon, 18 May 2015 18:21:57 +0000 (11:21 -0700)]
Bump version to 0.3
bors [Mon, 18 May 2015 15:42:06 +0000 (15:42 +0000)]
Auto merge of #1619 - Eljay:fix-doc-open, r=alexcrichton
Fixes #1595.
Alex Crichton [Mon, 18 May 2015 15:32:35 +0000 (08:32 -0700)]
Don't auto-build dotfiles in inferred folders
Whenever Cargo infers various targets for a project it currently picks up all
files in associated folders, but dotfiles are a common example of files which
editors generate which Cargo should not pick up, so this commit ignores all
dotfiles in the folders that it is looking at.
Closes #1615
Lee Jeffery [Sun, 17 May 2015 20:57:10 +0000 (21:57 +0100)]
Reuse existing crate_name method instead.
bors [Sun, 17 May 2015 20:30:03 +0000 (20:30 +0000)]
Auto merge of #1616 - sbeckeriv:master, r=alexcrichton
This resolves #1379
bors [Sun, 17 May 2015 20:06:53 +0000 (20:06 +0000)]
Auto merge of #1620 - Eljay:empty-package-name, r=alexcrichton
Some simple validation for package/target names. Currently failure for these cases happens later in rustc (e.g. "crate name must not be empty") or at the os level (e.g. "Is a directory" error when package name is empty on linux). Better to handle this earlier so it's consistent across platforms.
Still could do with a lot of validation for invalid characters etc. though.
Stephen Becker IV [Sun, 17 May 2015 16:32:53 +0000 (09:32 -0700)]
Fix whitespace
Now matches test output.
Stephen Becker IV [Sun, 17 May 2015 16:01:50 +0000 (09:01 -0700)]
Update text per comment in pull request.
Better error message with details around lib and bin.
Lee Jeffery [Sun, 17 May 2015 12:03:23 +0000 (13:03 +0100)]
Added some checks for empty package and target names.
Lee Jeffery [Sun, 17 May 2015 08:21:50 +0000 (09:21 +0100)]
Fix `doc --open` crate name.
Stephen Becker IV [Sat, 16 May 2015 19:39:48 +0000 (12:39 -0700)]
Update error message with more details.
This resolves #1379.
Alex Crichton [Sat, 16 May 2015 17:34:10 +0000 (10:34 -0700)]
Use the right Kind when calculating compiled libraries
The wrong kind was mistakenly used in the case of having a dependency on a
plugin.
bors [Thu, 14 May 2015 20:34:00 +0000 (20:34 +0000)]
Auto merge of #1611 - IvanUkhov:missing-bracket, r=alexcrichton
Ivan Ukhov [Thu, 14 May 2015 19:32:31 +0000 (15:32 -0400)]
Add a missing square bracket
bors [Wed, 13 May 2015 04:24:28 +0000 (04:24 +0000)]
Auto merge of #1604 - alexcrichton:update, r=alexcrichton
There was a lifetime parameter regression in git2-rs which prevented Cargo from
building on nightly
Alex Crichton [Wed, 13 May 2015 04:22:14 +0000 (21:22 -0700)]
Update Cargo to rust master
There was a lifetime parameter regression in git2-rs which prevented Cargo from
building on nightly
bors [Mon, 11 May 2015 18:01:02 +0000 (18:01 +0000)]
Auto merge of #1598 - critiqjo:bash-complete, r=alexcrichton
Fixes #1548
@gentoo90 is it possible to handle long-opts such as `--url=` nicely?
@jeffs please test this out in OS X default bash version...
critiqjo [Sun, 10 May 2015 11:07:50 +0000 (16:37 +0530)]
Bash completion: bash 3 compatibility
bors [Thu, 7 May 2015 19:18:10 +0000 (19:18 +0000)]
Auto merge of #1568 - sondrele:rustc-subcommand, r=alexcrichton
## Work in progress
I have followed issue #595 for a while now. I hope that this PR can solve it, after it's done of course.
@alexcrichton: on IRC the other day, you suggested adding a `Vec<String>` to the `CompileOptions`. I have done this, but wasn't sure what the best way to identify the correct `Target` would be, so currently everything gets compiled with the additional arguments.
I considered adding a `Target` structure to the `CompileOptions` as well, and then in `cargo_rustc::build_base_args` only append the arguments if the `Target` matches. What do you think about this? Is there an easier way of figuring out the correct `Target`?
r? @alexcrichton
bors [Thu, 7 May 2015 18:39:48 +0000 (18:39 +0000)]
Auto merge of #1590 - alexcrichton:issue-1589, r=brson
Knowing the target architecture for calculating the filename is needed when
calculating the name of a dynamic library, and previously this was only taken
into account when a target was a plugin. Targets can, however, request that they
are built as a dynamic library which also needs to be taken into account.
Closes #1589
Alex Crichton [Thu, 7 May 2015 02:29:05 +0000 (19:29 -0700)]
Add a Kind argument to target_filenames
Knowing the target architecture for calculating the filename is needed when
calculating the name of a dynamic library, and previously this was only taken
into account when a target was a plugin. Targets can, however, request that they
are built as a dynamic library which also needs to be taken into account.
Closes #1589
bors [Wed, 6 May 2015 16:54:57 +0000 (16:54 +0000)]
Auto merge of #1586 - gentoo90:bash-comp, r=wycats
Fix inability to complete more than one option of a command.
Add missing options.
gentoo90 [Wed, 6 May 2015 12:37:35 +0000 (15:37 +0300)]
Bash-completion minor improvements
Fix inability to complete more than one option of a command.
Add missing options.
Sondre Lefsaker [Wed, 6 May 2015 10:08:43 +0000 (12:08 +0200)]
Suggest adding flags to filter the package in the error message
Sondre Lefsaker [Wed, 6 May 2015 08:33:38 +0000 (10:33 +0200)]
Cleanup:
- Dereference arguments before matching
- use square brackets for vec! macro
Sondre Lefsaker [Wed, 6 May 2015 08:29:59 +0000 (10:29 +0200)]
Update subcommand documentation
bors [Wed, 6 May 2015 00:11:54 +0000 (00:11 +0000)]
Auto merge of #1585 - tshepang:typos, r=alexcrichton
Tshepang Lekhonkhobe [Wed, 6 May 2015 00:05:41 +0000 (02:05 +0200)]
fix typos caught by codespell
bors [Tue, 5 May 2015 23:28:56 +0000 (23:28 +0000)]
Auto merge of #1584 - alexcrichton:issue-797, r=brson
Closes #797
Closes #1575
This is a reopening of #1170 but I see the two closed issues as important enough that this needs to land in some form or another, and I'm more comfortable with always taking into account untracked files than only if there isn't a commit yet.
Alex Crichton [Wed, 14 Jan 2015 05:40:22 +0000 (21:40 -0800)]
Scan untracked files in git for packaging/deps
Closes #797
Closes #1575
bors [Tue, 5 May 2015 17:42:08 +0000 (17:42 +0000)]
Auto merge of #1577 - alexcrichton:issue-1567, r=brson
Previously if a package had been activated without the default feature and then
it was attempted to be reactivated with the default feature, resolution wouldn't
continue and actually activate the default feature. This means that the
fingerprint on the other end of compilation would be slightly different because
the set of activated features would be slightly different, causing spurious
recompiles.
Closes #1567
bors [Tue, 5 May 2015 16:50:19 +0000 (16:50 +0000)]
Auto merge of #1576 - takkanm:add_search_to_help, r=alexcrichton
There was no "Search" to help message.
Alex Crichton [Tue, 5 May 2015 05:55:03 +0000 (22:55 -0700)]
Check default features when skipping resolution of a package
Previously if a package had been activated without the default feature and then
it was attempted to be reactivated with the default feature, resolution wouldn't
continue and actually activate the default feature. This means that the
fingerprint on the other end of compilation would be slightly different because
the set of activated features would be slightly different, causing spurious
recompiles.
Closes #1567
Mitsutaka Mimura [Tue, 5 May 2015 02:13:04 +0000 (11:13 +0900)]
change search help to better message
Mitsutaka Mimura [Tue, 5 May 2015 01:59:05 +0000 (10:59 +0900)]
add search to help
bors [Sun, 3 May 2015 19:43:40 +0000 (19:43 +0000)]
Auto merge of #1574 - alexcrichton:rustup, r=alexcrichton
Alex Crichton [Sun, 3 May 2015 19:41:04 +0000 (12:41 -0700)]
Update to rust master, picking up metadata mtime changes
This commit adds a new `MTime` structure specifically for dealing with
modification times across platforms.
Sondre Lefsaker [Sat, 2 May 2015 23:11:46 +0000 (01:11 +0200)]
Add more tests:
- `build_with_args_to_one_of_multiple_binaries`, verify that only one bin gets built
- `fails_with_args_to_all_binaries`
- `build_with_args_to_one_of_multiple_tests`, same behavious as for the binaries
- `build_foo_with_bar_dependency`, verify that bar dependency gets built and only foo gets compiled with args
- `build_only_bar_dependency`, build the bar package, that foo depends, on with the extra args
Sondre Lefsaker [Sat, 2 May 2015 22:49:58 +0000 (00:49 +0200)]
Cleanup tests - favor more explicit expected result instead of using helper functions
Sondre Lefsaker [Sat, 2 May 2015 16:18:05 +0000 (18:18 +0200)]
Modify test to build `main` like before, but `lib` also gets built as a dependency.
- The test verifies that the trailing arguments only gets passed to the binary being built
Sondre Lefsaker [Sat, 2 May 2015 14:30:16 +0000 (16:30 +0200)]
Remove the arguments from `BuildConfig` and append them to the profile that's being compiled instead.
- An error will be returned if the length of `targets` is not 1
- The profile of `targets` gets cloned in order to append the extra arguments.
- The new test verifies that the build fails due to both `lib` and `main` being compiled
Sondre Lefsaker [Sat, 2 May 2015 10:59:58 +0000 (12:59 +0200)]
Add new field `rustc_args` to the `Profile`
- This field will be set by the `cargo rustc` command, only if one target is being compiled
- The field can not be read from the Cargo.toml
Sondre Lefsaker [Sat, 2 May 2015 10:19:55 +0000 (12:19 +0200)]
Remove the `pkgid` arg and replace the `profile` flag with `package`.
Sondre Lefsaker [Fri, 1 May 2015 23:01:30 +0000 (01:01 +0200)]
Pass the `arg_opts` from the command line further on to the CompileOptions.
- The new tests verifies that the extra arguments gets appended to the command. One is for lib and one is for main
- Currently the arguments gets passed on to *every* target that gets built, so the tests only contain one file each
Sondre Lefsaker [Fri, 1 May 2015 21:47:07 +0000 (23:47 +0200)]
Add a new field to CompileOptions and BuildConfig: `target_rustc_args`
- The new field is a list with arguments to compile the target with.
- There should only be one target that gets compiled with these arguments
Sondre Lefsaker [Fri, 1 May 2015 21:19:43 +0000 (23:19 +0200)]
Add new subcommand `rustc`.
- `cargo rustc` is starting out based on `cargo build`
Jakub Bukaj [Sun, 26 Apr 2015 21:42:55 +0000 (23:42 +0200)]
Loosen the dependency versions in Cargo.toml
bors [Thu, 30 Apr 2015 02:11:47 +0000 (02:11 +0000)]
Auto merge of #1566 - alexcrichton:fix-transitive-update-dash-p, r=brson
Currently when a dependency is transitively updated the source may not itself be
updated, so an update may not happen at all. This commit modifies this behavior
to be sure to add the non-updated source to the registry for any matching
package which will trigger the source to update itself.
bors [Thu, 30 Apr 2015 01:48:01 +0000 (01:48 +0000)]
Auto merge of #1564 - alexcrichton:right-timeout, r=brson
Previously a timeout was set via libcurl's blanket timeout option, which is a
timeout for the entire request. This isn't always what we want, however, as
cargo is used on quite a variety of networks. Instead what we really want is
timing out data being received, so instead of a blanket timeout we set two
different timeouts:
* The connect timeout is now configured (time it takes to connect the socket)
* A "low speed" timeout is now also set. This means that if Cargo doesn't
receive 10 bytes of data in the specified tiemout period that the entire
transfer will be timed out.
Closes #1560
Alex Crichton [Wed, 29 Apr 2015 18:58:13 +0000 (11:58 -0700)]
Tweak the meaning of HTTP timeouts
Previously a timeout was set via libcurl's blanket timeout option, which is a
timeout for the entire request. This isn't always what we want, however, as
cargo is used on quite a variety of networks. Instead what we really want is
timing out data being received, so instead of a blanket timeout we set two
different timeouts:
* The connect timeout is now configured (time it takes to connect the socket)
* A "low speed" timeout is now also set. This means that if Cargo doesn't
receive 10 bytes of data in the specified tiemout period that the entire
transfer will be timed out.
Closes #1560
Alex Crichton [Thu, 30 Apr 2015 01:42:52 +0000 (18:42 -0700)]
Fix transitively updating dependencies
Currently when a dependency is transitively updated the source may not itself be
updated, so an update may not happen at all. This commit modifies this behavior
to be sure to add the non-updated source to the registry for any matching
package which will trigger the source to update itself.
bors [Wed, 29 Apr 2015 20:38:14 +0000 (20:38 +0000)]
Auto merge of #1559 - alexcrichton:platform-specific-deps++, r=brson
They're available at the top-level, so no reason to not expose them at the
target level as well!
Closes #1464